import { request } from "@/utils/request.js"

// 商家详情
export function merchantInfo(data = {}) {
	return request({
		url: '/merchant/info',
		data
	})
}

// 更新商家
export function merchantUpdateInfo(data = {}) {
	return request({
		url: '/merchant/updateInfo',
		data,
		method: 'POST',
		showMsg: true
	})
}

// 员工列表
export function merchantStaffPage(data = {}) {
	return request({
		url: '/merchant/staffPage',
		data
	})
}

// 员工详情
export function merchantStaffInfo(data = {}) {
	return request({
		url: '/merchant/staffInfo',
		data
	})
}

// 添加员工
export function merchantAddStaff(data = {}) {
	return request({
		url: '/merchant/addStaff',
		data,
		method: 'POST',
		showMsg: true
	})
}

// 更新员工
export function merchantUpdateStaff(data = {}) {
	return request({
		url: '/merchant/updateStaff',
		data,
		method: 'POST',
		showMsg: true
	})
}

// 删除员工
export function merchantDeleteStaff(data = {}) {
	return request({
		url: '/merchant/deleteStaff',
		data,
		method: 'POST',
		showMsg: true
	})
}

// 上下架员工
export function merchantUpOrDownStaff(data = {}) {
	return request({
		url: '/merchant/upOrDownStaff',
		data,
		method: 'POST',
		showMsg: true
	})
}

// 员工作品列表
export function merchantStaffWorkPage(data = {}) {
	return request({
		url: '/merchant/staffWorkPage',
		data
	})
}

// 添加员工作品
export function merchantAddStaffWork(data = {}) {
	return request({
		url: '/merchant/addStaffWork',
		data,
		method: 'POST',
		showMsg: true
	})
}

// 更新员工作品
export function merchantUpdateStaffWork(data = {}) {
	return request({
		url: '/merchant/updateStaffWork',
		data,
		method: 'POST',
		showMsg: true
	})
}

// 删除员工作品
export function merchantDeleteStaffWork(data = {}) {
	return request({
		url: '/merchant/deleteStaffWork',
		data,
		method: 'POST',
		showMsg: true
	})
}

// 收藏用户列表
export function merchantCollectUserPage(data = {}) {
	return request({
		url: '/merchant/collectUserPage',
		data
	})
}

// 评价列表
export function merchantCommentPage(data = {}) {
	return request({
		url: '/merchant/comment/page',
		data
	})
}

// 推广申请列表
export function merchantPromoteRecordPage(data = {}) {
	return request({
		url: '/merchant/promoteRecord/page',
		data
	})
}

// 推广申请详情
export function merchantPromoteRecordInfo(data = {}) {
	return request({
		url: '/merchant/promoteRecord/info',
		data
	})
}

// 提交推广申请
export function merchantPromoteRecordApprove(data = {}) {
	return request({
		url: '/merchant/promoteRecord/approve',
		data,
		showMsg: true
	})
}